* {
    padding: 0;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #1a629c;
}
html::after {
    content: "By Ghost.";
    position: absolute;
    bottom: 10px;
    color: cyan;
    right: 10px;
    z-index: 15;
}

.box {
    display: flex;
    justify-content: center;
    width: 900px;
    height: 300px;
    overflow: hidden;
}

.item {
    position: relative;
    transition: all .3s linear;
    overflow: hidden;
}

.item img {
    width: 400px;
    position: relative;
    /* animation: name duration timing-function delay iteration-count direction fill-mode; */
    /* animation: toleft 3s linear 1 forwards; */
    transition: left .3s linear;
    left: -140px;
}

@keyframes toleft {
    0% {
        left: 0px;
    }

    50% {
        left: -250px;
    }

    100% {
        left: -140px;
    }

}

.item img:hover {
    left: 0px;
    /* animation: .3s toright linear forwards; */
    /* transition: left .3s linear; */
}

@keyframes toright {
    0% {
        left: -140px;
    }

    100% {
        left: 0px;
    }
}

.item:hover {
    flex-shrink: 0;
    flex-grow: 0;
}